<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        // 声明函数
        function fn(a,b,c){
          if(b<a && c<a){
            if(b<c){
                console.log(b,c,a);
                
            }else{
                if(c<b){
                    console.log(c,b,a);
                }
            }
        }else if(a<b && c<b){
            if(a<c){
                console.log(a,c,b);
                
            }else{
                if(c<a){
                    console.log(c,a,b);
                }
            }
        }else if(b<c && a<c){
            if(a<b){
                console.log(a,b,c);
                
            }else{
                if(b<a){
                    console.log(b,a,c);
                }
            }
        }
        }

        fn(5,10,2)
    </script>
</body>
</html>